package com.ericsson.rm.model;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;


/**
 * The persistent class for the PROJECT_DETAIL database table.
 * 
 */
@Entity
@NamedQueries({
	@NamedQuery(name="ProjectDetail.getProjNameList",
				query="select p.projectName from ProjectDetail p where p.projectName LIKE :projName"),
	
	@NamedQuery(name="ProjectDetail.getProjDetailList",
				query ="select new com.ericsson.rm.response.ProjectDetailsResponse(p.projectName,p.projectId) from ProjectDetail p where p.projectName LIKE :projName")
	
})

@Table(name="RP_PROJECT_DETAIL")
public class ProjectDetail implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@Column(name="PROJECT_ID")
	private String projectId;

	@Column(name="NO_OF_RESOURCE")
	private String noOfResource;

	@Temporal(TemporalType.DATE)
	@Column(name="PROJECT_END_DATE")
	private Date projectEndDate;

	@Column(name="PROJECT_NAME")
	private String projectName;

	@Temporal(TemporalType.DATE)
	@Column(name="PROJECT_START_DATE")
	private Date projectStartDate;

	private String region;

	private String status;

	//bi-directional many-to-one association to ProjectResourceDetail
	@OneToMany(mappedBy="projectDetail")
	private List<ProjectResourceDetail> projectResourceDetails;

	//bi-directional many-to-one association to ProjectSkillDetail
	@OneToMany(mappedBy="projectDetail")
	private List<ProjectSkillDetail> projectSkillDetails;

	public ProjectDetail() {
	}

	public String getProjectId() {
		return this.projectId;
	}

	public void setProjectId(String projectId) {
		this.projectId = projectId;
	}

	public String getNoOfResource() {
		return this.noOfResource;
	}

	public void setNoOfResource(String noOfResource) {
		this.noOfResource = noOfResource;
	}

	public Date getProjectEndDate() {
		return this.projectEndDate;
	}

	public void setProjectEndDate(Date projectEndDate) {
		this.projectEndDate = projectEndDate;
	}

	public String getProjectName() {
		return this.projectName;
	}

	public void setProjectName(String projectName) {
		this.projectName = projectName;
	}

	public Date getProjectStartDate() {
		return this.projectStartDate;
	}

	public void setProjectStartDate(Date projectStartDate) {
		this.projectStartDate = projectStartDate;
	}

	public String getRegion() {
		return this.region;
	}

	public void setRegion(String region) {
		this.region = region;
	}

	public String getStatus() {
		return this.status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public List<ProjectResourceDetail> getProjectResourceDetails() {
		return this.projectResourceDetails;
	}

	public void setProjectResourceDetails(List<ProjectResourceDetail> projectResourceDetails) {
		this.projectResourceDetails = projectResourceDetails;
	}

	public List<ProjectSkillDetail> getProjectSkillDetails() {
		return this.projectSkillDetails;
	}

	public void setProjectSkillDetails(List<ProjectSkillDetail> projectSkillDetails) {
		this.projectSkillDetails = projectSkillDetails;
	}

}